chore(backend): Limit exposed token verification related errors#2189
Conversation
Co-authored-by: flawnn <fl4wn@protonmail.com>
🦋 Changeset detectedLatest commit: 5410436 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
dimkl
left a comment
There was a problem hiding this comment.
❓ How is dropping those 2 exports going to resolve the use case of user of catching and handling those errors? I think i got confused. 😓
|
@dimkl It doesn't. A comment in the other PR suggested we wanted to keep some of these exports internal. This PR aims to narrow the scope of the exports on |
|
I would suggest we close this PR because in the context of the Public APIs RFC we are going to change the exports of the |
| export { AuthStatus } from './authStatus'; | ||
| export type { RequestState } from './authStatus'; | ||
| export * from './errors'; | ||
| export { TokenVerificationError, TokenVerificationErrorReason } from './errors'; |
There was a problem hiding this comment.
@tmilewski As the discussion about the error-related exports for v5 is still ongoing, I think we need to do the following:
- export the requested error from
release/v4 - remove
export * from './errors'from here - revisit this then we make a decision
Co-authored-by: flawnn <fl4wn@protonmail.com>
Description
Removes both
TokenVerificationErrorAction&TokenVerificationErrorCodefrom@clerk/backendexports as both are internal.It also happens to support @flawnn's work/use-case in #1980, once we backport to
release/v4.Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore